<?php
	// 加载公共文件
	include_once('../../public/config/config.php');
	include_once('../../public/config/sql.php');

	//接收post方式的传值
	$name     =  isset($_POST['name']) ? $_POST['name'] : '';
	$title    =  isset($_POST['title']) ? $_POST['title'] : '';
	$key      =  isset($_POST['key']) ? $_POST['key'] : '';
	$describe =  isset($_POST['describe']) ? $_POST['describe'] : '';
	$username =  isset($_POST['username']) ? $_POST['username'] : '';
	$company  =  isset($_POST['company']) ? $_POST['company'] : '';
	$content  =  isset($_POST['content']) ? $_POST['content'] : '';
	$email    =  isset($_POST['email']) ? $_POST['email'] : '';
	$tel      =  isset($_POST['tel']) ? $_POST['tel'] : '';
	$home     =  isset($_POST['home']) ? $_POST['home'] : '';
	$id       =  isset($_POST['id']) ? $_POST['id'] : '';
	
	// 实例化对象
	$obj = new sql($info);	

	// 构建SQL语句，发送执行
	$val = "`name`='{$name}',title='{$title}',`key`='{$key}',`describe`='{$describe}',username='{$username}',company='{$company}',content='{$content}',email='{$email}',tel='{$tel}',home='{$home}'";

	if($obj->db_update('siteInformation', $val, $id)){

		header('location:../delayJump.php?param=siteInformation');
	}else{

		header('location:../index.php?param=siteInformation');
	}
?>